<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Builddetail_model extends MY_Model
{
    function Builddetail_model()
    {
        parent::MY_Model();
    }
	function ww_get_res_user_info($uid, $land)
	{
		return $this->getRows("CALL ww_get_res_user_info('$uid', '$land')", 0);
	}
	function ww_get_user_info_build($uid, $oasis_orderid=0)
	{
		return $this->getRows("CALL ww_get_user_info_build('$uid', '$oasis_orderid')", 1);
	}
	function ww_update_res_by_hour($uid, $land, $food, $wood, $metal, $petroleum, $time)
	{
		$this->exeQuery("CALL ww_update_res_by_hour('$uid', '$land', '$food', '$wood', '$metal', '$petroleum', '$time');");
	}
	function ww_add_build_upgrade($uid, $buildid, $oasis_orderid, $food, $wood, $metal, $petroleum, $time_complete)
	{
		$this->exeQuery("CALL ww_add_build_upgrade('$uid', '$buildid', '$oasis_orderid', '$food', '$wood', '$metal', '$petroleum', '$time_complete');");
	}
	function ww_update_build_by_user($uid, $land, $strSuccess, $lstid)
	{
		$this->exeQuery("CALL ww_update_build_by_user('$uid', '$land', '$strSuccess', '$lstid');");
	}
}